﻿using System.Collections.Generic;

namespace Twitter
{
	/// <summary>
	/// Exposes operations related to the authenticated user' friends and 
	/// followers.
	/// </summary>
	public interface IFriendship : IHideObjectMembers
	{
		/// <summary>
		/// Follows the given user. 
		/// </summary>
		bool Follow(string screenName);

		/// <summary>
		/// Gets all users following the authenticated user.
		/// </summary>
		IEnumerable<string> GetFollowers();

		/// <summary>
		/// Gets all friends of the authenticated user (that is, 
		/// users with which he's mutually following).
		/// </summary>
		IEnumerable<string> GetFriends();

		/// <summary>
		/// Stops following the given user.
		/// </summary>
		bool Leave(string screenName);

		/// <summary>
		/// Follows all users that are following the 
		/// authenticated user but that he's not 
		/// following in turn.
		/// </summary>
		/// <returns></returns>
		IEnumerable<string> MakeFriends();

		/// <summary>
		/// Stops following users which are no longer 
		/// following the authenticated user.
		/// </summary>
		IEnumerable<string> ForgetLostFriends();

		/// <summary>
		/// Tests whether the authenticated user is a 
		/// mutual friend with given user. Note that this 
		/// only verifies if both users are following 
		/// each other.
		/// </summary>
		bool IsMutualFriendOf(string screenName);

		/// <summary>
		/// Tests whether the authenticated user is a 
		/// friend of the given user, that is, whether 
		/// he's following that user.
		/// </summary>
		bool IsFriendOf(string screenName);

		/// <summary>
		/// Tests whether the first user is a friend of the second.
		/// </summary>
		bool IsFriendOf(string screenName, string friendOf);

		/// <summary>
		/// Tests whether the first user is a friend of the second 
		/// and viceversa.
		/// </summary>
		bool AreMutualFriends(string firstScreenName, string secondScreenName);
	}
}
